<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8"/>
    <title>公共页面</title>
    <link th:href="@{/local css/index.css}" rel="stylesheet" type="text/css"/>
    <link rel="shortcut icon" th:href="@{/image/walmart.png}" type="image/x-icon"/>
</head>
<body>
<!--
    这里包含了每个页面的公共模块,有利于代码复用
-->
<!--头部导航条模块-->
<div class="layui-header header" th:fragment="head" style="background: RGB(0,123,255)">
    <script>
        //        <![CDATA[
        var layer;
        layui.use(["layer","element"],function () {
            layer = layui.layer;
        });
        //JavaScript代码区域
        //        ]]>
    </script>
    <div class="layui-main">
        <a class="logo" href="/mall/index.html">
            <img th:src="@{/image/logo.png}" title="logo"/>
        </a>
        <!-- 头部区域（可配合layui已有的水平导航） -->
        <!--<ul class="layui-nav layui-layout-left">-->
        <!---->
        <!--</ul>-->
        <ul class="layui-nav layui-layout-right">
            <li class="layui-nav-item" style="color:#393D49;">
                <a href="javascript:;">分类</a>
                <dl class="layui-nav-child" id="category">

                </dl>
                <script>
                    //                    <![CDATA[
                    //加载分类
                    $.get("/mall/admin/classification/list.do?type=1&pageindex=-1", function (data) {
                        if (data.state == 0) {
                            var list = $("#category");
                            $(data.data).each(function (index, item) {
                                var cat = $("<dd><a href='/mall/product/category.html?cid="+item.id+"'>" + item.cname + "</a></dd>");
                                list.append(cat);
                            })
                        } else {
                            alert(data.message);
                        }
                    });
                    //                    ]]>
                </script>
            </li>
            <li class="layui-nav-item">
                <a href="javascript:;">
                    <i class="fa fa-user-circle"></i>&nbsp;
                    <span th:if="${session.user == null}">请登陆</span>
                    <span th:if="${session.user != null}" th:text="'欢迎您!&nbsp;' + ${session.user.username}">请登陆</span>
                </a>
                <dl class="layui-nav-child">
                    <dd th:if="${session.user != null}"><a href="/mall/user/logout.do"><i class="fa fa-sign-out"></i> 退出登录</a></dd>
                    <dd th:if="${session.user != null}"><a href="/mall/order/toList.html"><i class="fa fa-list"></i> 我的订单</a></dd>
                    <dd th:if="${session.user != null}"><a href="/mall/product/toCart.html"><i class="fa fa-shopping-cart"></i> 购物车</a></dd>
                    <dd th:if="${session.user == null}"><a href="/mall/user/toLogin.html"><i class="fa fa-sign-in"></i> 登录</a></dd>
                    <dd th:if="${session.user == null}"><a href="/mall/user/toRegister.html"><i class="fa fa-user-plus"></i> 注册</a></dd>
                </dl>
            </li>
            <!--<li class="layui-nav-item"><a href="">退了</a></li>-->
        </ul>
    </div>
</div>

<!--底部模块-->
<div class="footer footer-index" th:fragment="foot">
    <div id="xiang">
        <div class="xleft">
            <div class="qing">
                <div class="qtu"></div>
                <h3>购物指南</h3>
                <div class="bao"><a href="">购物流程</a></div>
                <div class="bao"><a href="">会员介绍</a></div>
                <div class="bao"><a href="">团购/机票</a></div>
                <div class="bao"><a href="">常见问题</a></div>
                <div class="bao"><a href="">大家电</a></div>
                <div class="bao"><a href="">联系客服</a></div>
            </div><div class="bao"></div>
            <div class="qing">
                <div class="qtu1"></div>
                <h3>配送方式</h3>
                <div class="bao"><a href="">上门自提</a></div>
                <div class="bao"><a href="">211限时达</a></div>
                <div class="bao"><a href="">配送服务查询</a></div>
                <div class="bao"><a href="">配送费收取标准</a></div>
                <div class="bao"><a href="">海外配送</a></div>
            </div>
            <div class="qing">
                <div class="qtu2"></div>
                <h3>支付方式</h3>
                <div class="bao"><a href="">货到付款</a></div>
                <div class="bao"><a href="">在线支付</a></div>
                <div class="bao"><a href="">分期付款</a></div>
                <div class="bao"><a href="">邮局汇款</a></div>
                <div class="bao"><a href="">公司转账</a></div>
            </div>
            <div class="qing">
                <div class="qtu3"></div>
                <h3>售后服务</h3>
                <div class="bao"><a href="">售后政策</a></div>
                <div class="bao"><a href="">价格保护</a></div>
                <div class="bao"><a href="">退款说明</a></div>
                <div class="bao"><a href="">返修/退换货</a></div>
                <div class="bao"><a href="">取消订单</a></div>
            </div>
            <div class="qing">
                <div class="qtu4"></div>
                <h3>特色服务</h3>
                <div class="bao"><a href="">夺宝岛</a></div>
                <div class="bao"><a href="">DIY装机</a></div>
                <div class="bao"><a href="">延保服务</a></div>
                <div class="bao"><a href="">京东E卡</a></div>
                <div class="bao"><a href="">节能补贴</a></div>
                <div class="bao"><a href="">京东通信</a></div>
            </div>
        </div>
        <div class="xright">
            <h3>京东自营覆盖区县</h3>
            <span>京东已向全国1864个区县提供自营配送服务，支持货到付款、POS机刷卡和售后上门服务。</span>
            <a href="">查看详情></a>
        </div>
    </div>
    <div id="down">
        <div class="down_top">
            <a href="#">关于我们</a>
            <a href="#">联系我们</a>
            <a href="#">商家入驻</a>
            <a href="#">营销中心</a>
            <a href="#">手机京东</a>
            <a href="#">友情链接</a>
            <a href="#">销售联盟</a>
            <a href="#">京东社区</a>
            <a href="#">京东公益</a>
            <a href="#" style="border-right:none">English Site</a>
        </div>
        <div class="down_center">
            <span>北京市公安局朝阳分局备案编号110105014669  |  京ICP证070359号  |  <a href="#">互联网药品信息服务资格证编号(京)-经营性-2014-0008</a>  |  新出发京零 字第大120007号</span>
            <span><a href="#">音像制品经营许可证苏宿批005号</a>  |  出版物经营许可证编号新出发(苏)批字第N-012号  |  互联网出版许可证编号新出网证(京)字150号</span>
            <span><a href="#">网络文化经营许可证京网文[2011]0168-061号</a>  违法和不良信息举报电话：4006561155  Copyright © 2004-2014  京东JD.com 版权所有</span>
            <span>京东旗下网站：<a href="">360TOP</a>  <a href="">拍拍网</a> <a href="">网银在线</a> </span>
        </div>
        <div class="down_bot" style="height:190px">
            <img th:src="@{/image/bot1.gif}" alt="" />
            <img th:src="@{/image/bot2.gif}" alt="" />
            <img th:src="@{/image/bot3.png}" alt="" />
            <img th:src="@{/image/bot4.png}" alt="" />
            <p>
                官方微信
            </p>
            <img style="height: 100px;width: 100px;margin-top: -11px" th:src="@{/image/weixin1.png}" alt="" />
        </div>
    </div>
    <hr style="color: #c2c2c2;" />
    <!-- 底部固定区域 -->
    © LJQ 2018
    <a href="/mall/admin/toLogin.html">在此登录后台管理系统</a>
</div>
</body>
</html>